#include<iostream>
using namespace std;
#include<vector>
#include<algorithm>
class Solution {
public:
    int minimumLength(string s) {
        int ans = 0;
        int arr[26] = { 0 };
        for (auto& e : s)
            ++arr[e - 'a'];
        for (auto& e : arr) {
            if(e)
                ans += e % 2 == 1 ? 1 : 2;
        }
        return ans;
    }
};